<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<head>
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<%@include file="../common/css.jsp"%>
<link rel="stylesheet" type="text/css" href="/css/style_fx.css" />
    <title>发现-笔飞美术作品</title>
       <%@include file="../common/jspcommon.jsp"%>
         
</head>
<body>
<div id="box">
  	 <%@include file="../common/header.jsp" %>
    	<div class="top_nav">
	        <div id="top_nav_1" onclick="$('#top_nav_1_sub').slideDown();" onmouseout="$('#top_nav_1_sub').hide();">所有艺术领域<div class="icon_1"></div>
	            <div id="top_nav_1_sub" style="display:none;" onmouseover="$('#top_nav_1_sub').show();">
	            <ul>
	            	<c:forEach items="${findList}" var="find">
	               		 <li><a href="#" onclick="findOfclass('${find.identifier}','find');">${find.name}</a></li>
	                </c:forEach>
	            </ul>
	            </div>
	        </div>
        <div id="top_nav_2" onclick="$('#top_nav_2_sub').slideDown();" onmouseout="$('#top_nav_2_sub').hide();">精选的<div class="icon_1"></div>
            <div id="top_nav_2_sub" style="display:none;" onmouseover="$('#top_nav_2_sub').show();">
            <ul>
                <li><a href="/found.htm">所有作品</a></li>
                <li><a href="#" onclick="findChoice()">精选</a></li>
                <li><a href="#" onclick="findLove()">最受欢迎</a></li>
                <li><a href="#" onclick="findMore()">最多浏览</a></li>
                <li><a href="#" onclick="findNew()">最新上架</a></li>
            </ul>
            </div>
        </div>
        <div id="top_nav_3" onclick="selectDate();" onmouseout="$('#top_nav_3_sub').hide();">
        	<div id="top_nav_3_img"></div><div class="icon_1"></div>
            <div id="top_nav_3_sub" onmouseover="$('#top_nav_3_sub').show();" style="display: none;">
       		 		<input type="hidden" id="startDate"/><input type="hidden" id="endDate"/>
                    <div id="startDateDiv" style="float:left; width:170px; height:182px; padding:0px 20px; border-right:solid 1px #e2e2e2;">
                    	<p style="text-align: center;">开 始 日 期</p>
                    	<div id="div1" style="width: 184px;height: 172px;"></div>
                    </div>
                    <div id="endDateDiv" style="float:left; width:170px; height:182px; padding:0px 20px; border-right:solid 1px #e2e2e2;" >
                    	<p style="text-align: center;">结 束 日 期</p>
                    	<div id="div2" style="width: 184px;height: 172px;"></div>
                    </div>
                    <div style="float:left; width:150px; text-align:center;">
                    	<p class="mt10"><a href="#" onclick="findOfclass('','week')">本周上传</a></p>
                        <p class="mt10"><a href="#" onclick="findOfclass('','month')">本月上传</a></p>
                        <p style="padding-top:90px;"><a href="#" onclick="showFind();"><img src="../images/btn_qd.jpg" alt=""/></a></p>
                    </div>
       	 	</div>
       	</div> 
        <div id="top_nav_4" ><div id="top_nav_4_img"></div><div class="icon_1"></div>
            <div id="top_nav_4_sub" style="display:none;" onmouseover="$('#top_nav_4_sub').show();">
                <select name="show_data" tabindex="10" id="province" onchange="selectArtist()" id="top_nav_4_sub_sel">
                </select>
            </div>
        </div>
        <div id="top_nav_5" onclick="$('#top_nav_5_sub').slideDown();" onmouseout="$('#top_nav_5_sub').hide();">价格<div class="icon_1"></div>
            <div id="top_nav_5_sub" style="display:none;" onmouseover="$('#top_nav_5_sub').show();">
            <ul>
                <li><a href="found.htm">所有价格</a></li>
                <c:forEach items="${priceList }" var="price">
                	<li><a href="#" onclick="findOfclass('${price.identifier}','price');">${price.name}</a></li>
                </c:forEach>
                
            </ul>
            </div>
        </div>
        <div id="top_nav_6" onclick="$('#top_nav_6_sub').slideDown();" onmouseout="$('#top_nav_6_sub').hide();"><div id="top_nav_6_img"></div><div class="icon_1"></div>
            <div id="top_nav_6_sub" style="display:none;" onmouseover="$('#top_nav_6_sub').show();">
            <ul>
            	
            	<c:forEach items="${tagList }" var="tag">
               		 <li><a href="#" onclick="findOfclass('${tag.identifier}','tag');">${tag.name}</a></li>
                </c:forEach>
            </ul>
            </div>
        </div>
        <div id="top_nav_7" onclick="$('#top_nav_7_sub').slideDown();" onmouseout="$('#top_nav_7_sub').hide();">高级搜索<div class="icon_1"></div>
            <div id="top_nav_7_sub" style="display:none;" onmouseover="$('#top_nav_7_sub').show();">
                <div onmouseover="$('#top_nav_7_sub_1').show();" onmouseout="$('#top_nav_7_sub_1').hide();"><a href="#"><img src="../images/btn_byyx.jpg" alt="" /></a>
                    <div id="top_nav_7_sub_1" style="display:none;" onmouseover="$('#top_nav_7_sub_1').show();">
                        <p><b>搜索学校</b></p>
                        <p class="mt10"><%@include file="companyName.jsp"%></p>
                    </div>
                </div>
               <!--  <div class="mt10"><a href="#" onclick="saveQuery();"> <img src="../images/btn_bcsstj.jpg" alt="" /></a></div> -->
                <div class="mt10" onmouseover="$('#top_nav_7_sub_2').show();" onmouseout="$('#top_nav_7_sub_2').hide();"><a href="#"><img src="../images/btn_sycl.jpg" alt="" /></a>
                    <div id="top_nav_7_sub_2" style="display:none;" onmouseover="$('#top_nav_7_sub_2').show();">
                       			 <ul>
            						<c:forEach items="${materialList }" var="material">
               							 <li><a href="#" onclick="findOfclass('${material.identifier}','material');">${material.name}</a></li>
                					</c:forEach>
            					</ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <div id="main_div">
        <div class="top_site_map"> 
	      <c:if test="${!empty findSoSession}">  
		      <span class="fl"> 
		      	  <c:if test="${!empty findSoSession.findName}">${findSoSession.findName}</c:if>
			      <c:if test="${findSoSession.choice}">+精选</c:if>
			      <c:if test="${findSoSession.bestLove}">+最受欢迎</c:if>
			       <c:if test="${findSoSession.bestMore}">+最多浏览</c:if>
			      <c:if test="${findSoSession.bestNew}">+最新上架</c:if>
			      <c:if test="${!empty findSoSession.priceName}">+${findSoSession.priceName}</c:if>
			      <c:if test="${findSoSession.week}">+当周</c:if>
			      <c:if test="${findSoSession.month}">+当月</c:if>
			     <c:if test="${!empty findSoSession.startDate && !empty findSoSession.endDate}">+ &nbsp;${findSoSession.startDate}—${findSoSession.endDate}</c:if>
		     	<c:if test="${!empty findSoSession.tagName}">+&nbsp;${findSoSession.tagName}</c:if>
		      
		      </span>
		      <span class="fl"><a href="#" onclick="deleteSave()"><img src="../images/c_prof.jpg" class="close" alt="" /></a></span>  
	      </c:if>
	        <span class="fr"><a href="found.htm"><img src="../images/btn_zp.jpg" alt="" /></a><a href="fartist.htm"><img src="../images/btn_ysj2.jpg" alt="" /></a></span>
        </div>
        
        <div class="main_div_left">
            <div class="category">
            <h2>热门分类</h2>
            <ul>
            	<c:forEach items="${hotList }" var="hot">
               		 <li ><a href="#" onclick="showPrint('${hot.identifier}')">${hot.name}</a></li>
                </c:forEach>
            </ul>

            <h2 class="mt40">更多搜索方式</h2>
             <ul>
                <li onmouseover="$('#prof').slideDown();" onmouseout="$('#prof').hide();"><a href="#">专业分类</a>
                    <div id="prof" style="display:none;" onmouseover="$('#prof').show();">
                    <ul>
                    	 <c:forEach items="${profList }" var="prof">
                        	<li><a href="#" onclick="showProf('${prof.identifier}')">${prof.name }</a></li>
                        </c:forEach>
                       
                    </ul>
                    </div>
                </li>
                
                <li onmouseover="$('#Div2').slideDown();" onmouseout="$('#Div2').hide();"><a href="#">尺寸</a>
                    <div id="Div2" style="display:none;" onmouseover="$('#Div2').show();">
                    <ul>
                    	 <c:forEach items="${sizeList }" var="size">
                        	<li><a href="#" onclick="soClassPicSize('${size.identifier}')">${size.name }</a></li>
                        </c:forEach>
                       
                    </ul>
                    </div>
                </li>
                <li onmouseover="$('#Div3').slideDown();" onmouseout="$('#Div3').hide();"><a href="#">价格</a>
                    <div id="Div3" style="display:none;" onmouseover="$('#Div3').show();">
                    <ul> 
                    <c:forEach items="${priceList }" var="price">
                        	<li><a href="#" onclick="soClassPicPrice('${price.identifier}')">${price.name }</a></li>
                        </c:forEach>
                    </ul>
                    </div>
                </li>
                <li onmouseover="$('#Div4').slideDown();" onmouseout="$('#Div4').hide();"><a href="#">作者毕业院校</a>
                    <div id="Div4" style="display:none;" onmouseover="$('#Div4').show();">
                        <p><b>搜索学校</b></p>
                        <p class="mt10"><%@include file="school.jsp"%></p>
                    </div>
                </li>
                <li onmouseover="$('#Div5').slideDown();" onmouseout="$('#Div5').hide();"><a href="#">作者所在城市</a>
                    <div id="Div5" style="display:none;" onmouseover="$('#Div5').show();">
                       <select name="show_data" tabindex="10" id="provinceLeft" onchange="selectLeftArtist()">
               		 </select>
                    </div>
                </li>
                <li onmouseover="$('#Div6').slideDown();" onmouseout="$('#Div6').hide();"><a href="#">适用环境</a>
                    <div id="Div6" style="display:none;" onmouseover="$('#Div6').show();">
                    <ul>
                        <c:forEach items="${groundList }" var="ground"><li><a href="#" onclick="soClassPicGround('${ground.identifier}')">${ground.name }</a></li></c:forEach>
                    </ul>
                    </div>
                </li>
                <li onmouseover="$('#Div7').slideDown();" onmouseout="$('#Div7').hide();"><a href="#">适用用途</a>
                    <div id="Div7" style="display:none;" onmouseover="$('#Div7').show();">
                    <ul>
                        <c:forEach items="${useList }" var="use"><li><a href="#" onclick="soClassPicUse('${use.identifier}')">${use.name }</a></li></c:forEach>
                    </ul>
                    </div>
                </li>
            </ul>
            </div>
        </div>
        <div class="main_div_right">
            <div class="main_div_list1">
	            <ul>
	            	<c:forEach items="${modelFindPic.list}" var="findPic" varStatus="vs">
		                <li class="item1">
		                	<div style="width: 214px;height: 164px;">
		                    <a href="#" onclick="fart('${findPic.identifier}')"><img id="img_${vs.count}" src="${findPic.imagePath }_300x200"  alt="" onload="loadImage(this,214,164);"/></a>
		                    </div>
		                    <div class="c_1">
		                        <p class="line">${findPic.title}</p>
		                        <p class="line">作者：<a href="fartistInfo.htm?artistId=${findPic.painter}">${findPic.artistName}</a></p>
		                        <p class="line">毕业院校：<a href="fartist.htm?school=${findPic.schoolid}">${findPic.schoolname}</a></p>
		                        <p class="line"><a href="#" onclick="findOfclass('${findPic.tag}','tag');">${findPic.artClassName}</a></p>
		                        <p ><del><font style="font-size: 10px;">￥</font><font style="color:#8B8B8A; font-size: 15px;font-weight: bold"><fmt:formatNumber value="${findPic.price}" pattern="#,##0.00#" type="number"/></font></del><font style="font-size: 10px;margin-left: 62px;">￥</font><font style="color:#030303;font-size: 15px;margin-left: 3px;font-weight: bold""><fmt:formatNumber value="${findPic.priceLow}" pattern="#,##0.00#" type="number"/></font></p>
		                    </div>
		                    <div class="c_2">
		                        <a href="#" onclick="ART.lookPic('${findPic.identifier}')" ><span class="icon_like">${findPic.loveAmount }</span></a>　<span class="icon_click">${findPic.viewAmount }</span>
		                        <c:if test="${findPic.choice}">
			                        <div class="icon_date">
			                        	<span>Q</span>
			                            <div class="tooltipi">
			                              Featured On: <strong><fmt:formatDate value="${findPic.gmtCreated}" pattern="yyyy-MM-dd " /> </strong>
			                            </div>
			                        </div>
		                       </c:if>
		                    </div>
		                </li>
		             </c:forEach>
	            </ul>
            </div>
             <!--  <script src="/js/jquery.masonry.min.js"></script> -->
	        <script>
	          /* $(function(){
	            
	            
	            var $container = $('.main_div_list1');
	        	$container.imagesLoaded(function(){
	        	  $container.masonry({
	        		  itemSelector: '.item1',
	        	  });
	        	});
	          }); */
	        </script>	
           <div class="page_div">
            	<div id="page" class="h_page"></div>
            </div>
        </div>
     	 <%@include file="../common/footer.jsp" %>	
    </div>
</div>
 
<script type="text/javascript" src="/js/page/pager.js"></script>
 <script type="text/javascript" src="/third/My97DatePicker/WdatePicker.js"></script>
 <script type="text/javascript">
 	
 	
	
	$(function(){
			$("#page").pager({
				pagenumber : "${modelFindPic.currentPage}",
				pagecount : "${modelFindPic.totalPage}",
				buttonClickCallback : function(page) {
					location.href = "/found.htm?page="+ page;
				}
			});
			
			WdatePicker({eCont:'div1',onpicked:function(dp){
				var t = dp.cal.getDateStr();
				$("#startDate").val(t);
			}})
			WdatePicker({eCont:'div2',onpicked:function(dp){
				var  t =dp.cal.getDateStr();
				$("#endDate").val(t);
			}});
			
			initProvince('province', '','');
		 	initProvince('provinceLeft', '','');
		 	
		 	/*
		 	$("#top_nav_4_sub_sel").mouseover(function(){
		 		$('#top_nav_4_sub').show();
		 		$("#top_nav_4").attr("onmouseout","");
		 	}).mouseout(function(){
		 		$("#top_nav_4").attr("onmouseout","$('#top_nav_4_sub').hide();");
		 		$('#top_nav_4_sub').hide();
		 	});
		 	*/
		 	
		 	$("#top_nav_4").click(function(e){
		 		e.stopPropagation();
		 		$('#top_nav_4_sub').slideDown();
		 	});
		 	
		 	$(document).click(function(){
		 		$('#top_nav_4_sub').hide();
		 	});
		});
	
	function selectDate(){
		
		$('#top_nav_3_sub').slideDown();
	}
	function foundMap(){
		window.location.href="map.htm";
	}
	//当前页面的查询
	function findOfclass(id,type){
		window.location.href="/found.htm?id="+id+"&type="+type;
	}
	//按时间查
	function showFind(){
		var startDate =$("#startDate").val();
		var	endDate	=$("#endDate").val();
		window.location.href="/found.htm?startDate="+startDate+"&endDate="+endDate;
	}
	//
	function showPrint(id){
		window.location.href="/print.htm?hot="+id;
	}
	//专业分类
	function showProf(id){
	 window.location.href="/prof.htm?prof="+id;
 	}
	//精选
	function findChoice(){
		 window.location.href="/found.htm?choice=true";
	}
	//
	function findLove(){
		window.location.href="/found.htm?bestLove=true";
	}
	function findMore(){
		window.location.href="/found.htm?bestMore=true";
	}
	function findNew(){
		window.location.href="/found.htm?bestNew=true";
	}
	function selectArtist(){
		//alert(11);
		var provinceCode= $("#province").val();
		window.location.href="/fartist.htm?province="+provinceCode;
		
	}
	function selectLeftArtist(){
		//alert(11);
		var provinceCode= $("#provinceLeft").val();
		window.location.href="/fartist.htm?province="+provinceCode;
		
	}
	 function soClassPicUse(classId){
		 window.location.href="/prints.htm?use="+classId ;
	 }
	function soClassPicSize(classId){
		window.location.href="/prints.htm?size="+classId ;
	 }
	function soClassPicGround(classId){
		window.location.href="/prints.htm?ground="+classId ;
	}
	function soClassPicPrice(classId){
		window.location.href="/prints.htm?price="+classId;
	}
	function saveQuery(){
		if(ART.checkLogin()){
		$.post("saveSo.htm", {
			}, function(isJoin) {
					if(isJoin){
						alert("保存成功。");
						window.location.href="found.htm"
					}else{
						alert("失败了，很抱歉。");
					}
			});
		}else{
			alert("请登录哦~");
			window.location.href="login.htm"
		}
	}
	
	function deleteSave(){
		$.post("deleteSave.htm", {
		}, function(isJoin) {
				if(isJoin){
					window.location.href="found.htm"
				}else{
					alert("失败了，很抱歉。");
				}
		});
	}
	</script>
</body>
</html>
